import { createWebHistory, createRouter } from 'vue-router'

import HomeView from '../views/home/Home.vue'
import login from '../views/login.vue'
import Home from '../views/home/index.vue'
import fenlei from '../views/home/fenlei.vue'
import gouwuche from '../views/home/gouwuche.vue'
import wode from '../views/home/wode.vue'
 const routes = [
    { path: '/', redirect: '/home/index' },
    {
        path: '/home',
        component: HomeView,
        children: [
            {
                path: 'index',
                component: Home,
            },
            {
                path: 'fenlei',
                component: fenlei,
            },
            {
                path: 'gouwuche',
                component: gouwuche,
            },
            {
                path: 'wode',
                component: wode,
            },
        ]
    },
    { path: '/login', component: login },
]

export const router = createRouter({
    history: createWebHistory(),
    routes,
})